package com.onlinemovies.service.implementation;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.onlinemovies.entity.ShowDetails;
import com.onlinemovies.repository.extension.ShowRepoitory;
import com.onlinemovies.service.ShowService;



@Service("showService")
@Transactional(readOnly=true)
public class ShowServiceImpl implements ShowService,Serializable {
	
	@Autowired
	private ShowRepoitory showRepository;
	
	@Override
	public List<ShowDetails> getAll() throws Exception {
		List<ShowDetails> showdtls = showRepository.getAll();
		return showdtls;
	}

	@Override
	public ShowDetails doInsert(ShowDetails showDetails) throws Exception {
	showRepository.merge(showDetails);
		return null;
	}
}
